package cn.itsource.pet.controller;

import cn.itsource.basic.util.AjaxResult;
import cn.itsource.basic.util.PageList;
import cn.itsource.pet.domain.PetType;
import cn.itsource.pet.domain.SearchMasterMessage;
import cn.itsource.pet.query.SearchMasterMessageQuery;
import cn.itsource.pet.service.ISearchMasterMessageService;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;


/**
 * 宠物控制器
 */
@RestController
@RequestMapping("/searchMasterMessage")
@Api(tags = "宠物类型管理", description = "宠物类型操作接口")
public class SearchMasterMessageController {

    @Autowired
    private ISearchMasterMessageService searchMasterMessageService;


    /**
     * 查询所有
     */
    @PostMapping("/publish")
    public AjaxResult publish(@RequestBody SearchMasterMessage message){
        //查询分页数据
        return searchMasterMessageService.publish(message);
    }



    /**
     * 寻主审核
     */
    @PostMapping("/shenghe")
    public AjaxResult shenghe(@RequestBody SearchMasterMessage message){
        //查询分页数据
        return searchMasterMessageService.shenghe(message);
    }

    /**
     * 查询所有
     */
    @PostMapping("/findPage")
    public PageList<SearchMasterMessage> findPage(@RequestBody SearchMasterMessageQuery messageQuery){
        //查询分页数据
        return searchMasterMessageService.findPage(messageQuery);
    }


}